﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Cloudix.Common;

namespace Cloudix.Web.Models
{
    public class MyContentProvider : BaseContentProvider
    {

        #region IContentProvider Members

        public override void InitializeContentCatalog(params string[] args)
        {
            // Create a dummy catalog
            for (int i = 1; i < 10; i++)
            {
                this.Add(new ContentBlock()
                {
                    Id = Guid.NewGuid(),
                    Content = "Lorem ipsum dom solor dit amet",
                    Title = String.Format("Content_" + i)
                });
            }

            // And add a dummy with specific Guid to be used in the client (aspx)
            this.Add(new ContentBlock()
            {
                Id = Guid.Parse("389445E1-0AF5-44CF-B625-8C98B3036E8F"),
                Title = "ACME",
                Content = "Hello world!",
                Language = Languages.DefaultOrUnspecified
            });
        }

        #endregion
    }
}